import { request, config } from 'utils';
import { stringify } from 'qs';
const {
  api: {
    equipment: {
      backupservice: {
        apigetlist,
        apiadd,
        apidelete,
        apiedit
      }
    },
  },
} = config;

export function getList(params) {
  return request(`${apigetlist}?${stringify(params)}`);
}

export function edit(params) {
  return request(apiedit, {
    method: 'POST',
    body: { ...params },
  });
}

export function deleteBatch(params) {
  return request(apidelete, {
    method: 'POST',
    body: { ...params },
  });
}

export function add(params) {
  return request(apiadd, {
    method: 'POST',
    body: { ...params },
  });
}

